#pragma once
#include <stdio.h>
#include <string>
//#include "SDL.h"
//#include "SDL_ttf.h"
#include "sdl\include\SDL.h"
#include "sdl\include\SDL_ttf.h"
#include "global.h"

const int MAX_TEXT_WIDTH = 200;
const int MAX_ITEMS = 13;
const int MAX_DICE_SLOTS = 6;
const int MAX_3KIND = 3;
const int MAX_4KIND = 4;
const int MAX_STRAIGHT = 5;

enum ScoreType{
	ONES, TWOS, THREES, FOURS, FIVES, SIXES, KIND3, KIND4, F_HOUSE, S_STRAIGHT, L_STRAIGHT, OMEGA, CHANCE
};

struct ScoreObj{
	ScoreType scoreTypes;
	bool beenScored;
	int score;
	string name;
	int text_width;  // the width of the text
};

class ScoreDice
{
public:
	/*--- Constructor ---*/
	ScoreDice();

	/*--- Base Game Functions ---*/
	void update(Dice * dice, Position a_position, SDL_Surface * a_buffer);
	void draw(SDL_Surface *a_buffer);
	void release();
	/*--- Accessors and Mutators ---*/
	void setFont(TTF_Font * a_font);
	void setScores(int a_index, Dice * dice);
	int getWidth() { return MAX_TEXT_WIDTH; } 
	int getHieght() { return text_height; }
	int getTextWidth(int a_index) { return score[a_index].text_width; }
	int getItems() { return MAX_ITEMS; }
	bool isScored(int a_index) {return score[a_index].beenScored;}
	
private:
	ScoreObj * score;
	TTF_Font * font;
	int text_height; // the hieght of the text
	
	/*--- Sub-Functions ---*/
	bool checkSpecialScores(int a_case, Dice * dice);
};